package bean;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToMany;

/**
 * @author wanghao7@asiainfo-linkage.com
 * @created on Dec 5, 2012 2:40:02 PM
 * @version
 * @since jdk1.5
 * @description
 */
@Entity
public class PollTopic extends Topic {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2121436756750865312L;

	private Boolean multiple;

	private Integer maxChoices;
	
	@OneToMany(mappedBy = "pollTopic", cascade = CascadeType.ALL)
	private Set<PollOption> options = new HashSet<PollOption>();

	public Boolean getMultiple() {
		return multiple;
	}

	public void setMultiple(Boolean multiple) {
		this.multiple = multiple;
	}

	public Integer getMaxChoices() {
		return maxChoices;
	}

	public void setMaxChoices(Integer maxChoices) {
		this.maxChoices = maxChoices;
	}

	public Set<PollOption> getOptions() {
		return options;
	}

	public void setOptions(Set<PollOption> options) {
		this.options = options;
	}

}
